<template>
    <div>
    <h1>绑定账号</h1>
    用户名：<input type="text" v-model="username">
    密码：<input type="password" v-model="password">
    <input type="button" value="绑定" @click="bind()">
    </div>
</template>
<script>
export default {
    name:'binduser',
    data() {
        return {
            username:'',
            password:'',
            uid:this.$route.query.uid,
        }
    },
    methods: {
        bind(){
            const data={
                "username":this.username,
                "password":this.password,
                "uid":this.uid,
            }
            this.axios.post("http://127.0.0.1:8000/bind/",data).then(res=>{
                console.log(res)
            }).catch(error=>{
                console.log(error.response)
            })
        }
    },
}
</script>